package com.example.mapper;

import com.example.entity.File;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.UserAction;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2021-05-31
 */
@Mapper
public interface FileMapper extends BaseMapper<File> {
    @Select("select filename,filetype,downloadcount from file   order by downloadcount  desc")
    List<File> getlist1();
    @Select("select filename,filetype,collectcount from file   order by collectcount  desc")
    List<File> getlist2();
    @Insert("insert into file(filename,path,uploadtime,downloadcount,collectcount) values(#{filename},#{path},#{uploadtime},#{downloadcount},#{collectcount})")
    void update1(String filename, String path,String uploadtime,int downloadcount,int collectcount);

}
